<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>我的寄售</title>
    <meta name="divport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../elementUI/index.css">
    <link rel="stylesheet" href="../../../css/index.css">
</head>

<body>
    <div id="app" class="minWidth">
        <el-form :inline="true" :form="form">
            <el-form-item>
                <el-input clearable v-model="form.Article_Name" placeholder="请输入商品名称" />
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSerach">查询</el-button>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="addEnterprise">发布</el-button>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="window.location.href = './Show.html'">我的寄售</el-button>
                <el-badge :value="badge" :max="99" :hidden="badge == 0?true:false" class="item">
                    <el-button @click="mymessage()">消息</el-button>
                </el-badge>
            </el-form-item>
        </el-form>

        <el-table :data="tableData" stripe border height="calc(100vh - 140px)" style="width: 100%" @expand-change="expand">
            <el-table-column align="center" label="" width="50" type="expand">
                <template v-slot="{row}">
                    <el-table :data="row.orderData" stripe border height="calc(100vh - 140px)" style="width: 100%">
                        <el-table-column align="center" label="序号" width="50" type="index"></el-table-column>
                        <el-table-column align="center" prop="Group_Transaction_SerialNumber" width="200" label="商品编号"></el-table-column>
                        <el-table-column align="center" prop="Article_Name" label="商品名"></el-table-column>
                        <el-table-column align="center" prop="Total_Quantity" label="总数量"></el-table-column>
                        <el-table-column align="center" prop="Quantity" label="购买数量"></el-table-column>
                        <el-table-column align="center" prop="Amount" label="花费"></el-table-column>
                        <el-table-column align="center" prop="Buyer_Contact" label="买家联系人"></el-table-column>
                        <el-table-column align="center" prop="Buyer_Contact_Phone" label="买家手机号"></el-table-column>
                        <el-table-column align="center" prop="Row_Status" label="状态"></el-table-column>
                        <el-table-column align="center" label="卖家企业">
                            <template v-slot="{row}"> 
                                <div :title="row.Enterprise_Name" style="width: 100%;white-space: nowrap; text-overflow: ellipsis;overflow: hidden;">
                                    <span>{{row.Enterprise_Name}}</span>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column align="center" prop="Submission_Time" label="交易完成时间" width="180"></el-table-column>
                        <el-table-column align="center" label="操作" width="200">
                            <template v-slot="{row}">
                                <div>
                                    <el-button type="primary" @click="detail($event,row)"
                                        size="small">查看详情</el-button>
                                </div>
                            </template>
                        </el-table-column>
                    </el-table>
                    
                    <div v-if="Number(row.total)>0" class="flex justify-between">
						<div class="">
						</div>
						<el-pagination background @size-change="handleSizeChange1($event,row)"
							@current-change="handleCurrentChange1($event,row)" :current-page="Number(row.form.page)"
							:page-sizes="[1,5,10,20]" :page-size="Number(row.form.limit)"
							layout="total, sizes, prev, pager, next, jumper" :total="Number(row.total)">
						</el-pagination>
					</div>
                </template>
            </el-table-column>
            <el-table-column align="center" label="序号" width="50" type="index"></el-table-column>
            <el-table-column align="center" prop="Picture_URL" label="商品图" width="125">
                <template v-slot="{row}">
                    <el-image v-if="row.Picture_URL != ''" style="width: 100px; height: 100px; border-radius: 9px;"
                        fit="cover" :src="DomainIMG + row.Picture_URL"></el-image>
                </template>
            </el-table-column>
            <el-table-column align="center" prop="Group_Purchasing_SerialNumber" width="200" label="商品编号"></el-table-column>
            <el-table-column align="center" prop="Article_Name" label="商品名"></el-table-column>
            <el-table-column align="center" prop="Total_Quantity" label="总数量"></el-table-column>
            <el-table-column align="center" prop="Amount" label="价格"></el-table-column>
            <el-table-column align="center" prop="Sell_Quantity" label="销售量"></el-table-column>
            <el-table-column align="center" prop="Residue_Quantity" label="剩余量"></el-table-column>
            <el-table-column align="center" prop="Contacts" label="联系人"></el-table-column>
            <el-table-column align="center" prop="Starting_Quantity" label="最低购买单位"></el-table-column>
        </el-table>
        <el-pagination background v-show="total > 0" @size-change="handleSizeChange"
            @current-change="handleCurrentChange" :current-page="form.page" :page-sizes="[10,20,30,50]"
            :page-size="form.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
        </el-pagination>
    </div>
    <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../js/vue.min.js"></script>
    <script type="text/javascript" src="../../../elementUI/index.js"></script>
    <script type="text/javascript" src="../../../js/utils.js"></script>
    <script type="text/javascript" src="./js/MyTenders.js"></script>
</body>

</html>